Dynomotion

Group: DynoMotion Message: 8450 From: morgtod Date: 10/5/2013
Subject: Step size buttons
I am looking for a way to reduce the number of buttons visible on the screen to make a touch screen friendly layout.  The number of jog buttons could be reduced by 2/3 if 2 of the 6 jog buttons were used for "feed" and "rapid".  


0.0001, 0.001, 0.01, 0.1, feed, rapid.

These buttons should also be mapped to the keyboard arrow buttons, without needing to hold a shift key.  

Is this possible???

Todd
Group: DynoMotion Message: 8451 From: Tom Kerekes Date: 10/5/2013
Subject: Re: Step size buttons
Hi Todd,

The code to define the arrow button's type and speed is in KMotionCNCDlg.cpp.   Here is an example:

        m_RightStep.Init    (this, 2, 1,m_JogSlowPercent*0.01,true);
        m_Right.Init        (this, 2, 1,m_JogSlowPercent*0.01,false);
        m_Right2.Init        (this, 2, 1,1.0,false);

All the arrow and step buttons are the class type of CMotionButton.  That can be initialized as a "Step" or "Jog" type with the true/false parameter.   And if Jog type a speed factor can be specified.

So I think you would need to change the code for the radio button click events (OnStep4 and OnStep5) to re-define one of the buttons in an appropriate manner.

Or maybe it would be easier to re-create the entire dialog screen which is what happens when the User changes things in the Tool Setup screens by calling:

            DestroyWindow();
            Create(IDD_KMOTIONCNC_0_ORIGINAL+m_DialogFace);  // put up the real main window
            m_LastFixtureDisplayed=m_LastToolDisplayed=-1;

The code:

        if (DoCheckShiftAndKey(VK_LEFT,wParam,lParam,LeftDown,Left2Down,
            TheFrame->GCodeDlg.m_Left,TheFrame->GCodeDlg.m_Left2,TheFrame->GCodeDlg.m_LeftStep)) return 1;

handles the shift to send "pushed" messages to the different buttons.  You could change this to always direct keys to your one button.

HTH
Regards
TK